import clsx from "clsx";


interface ButtonProps {
    type?: "button" | "submit" | "reset";
    isLoading?: boolean;
    children: React.ReactNode;
    className?: string;
}

interface LoginBtnProps {
    children: React.ReactNode;
}

export const Button = (props: ButtonProps) => {
    const {
        type = 'button',
        isLoading = false,
        children,
        className = '',
        ...restProps
    } = props

    return (
        <button
            type={type}
            disabled={isLoading}
            className={clsx('button', className)}
            {...restProps}
        >
            {/* {isLoading ? <Loading /> : children} */}
            {children}
        </button>
    )
}


export const LoginBtn = (props: LoginBtnProps) => {
    const { children, ...restProps } = props;
    return (
        <Button type="submit" className="mx-auto rounded-3xl w-44" {...restProps}>
            {children}
        </Button>
    )
}